package org.example.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.system.api.model.SysUser;
import org.example.system.dao.SysUserDao;
import org.example.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统用户 服务实现类
 * </p>
 *
 * @author LiJunYi
 * @since 2020-05-25
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUser> implements ISysUserService {

    @Autowired
    SysUserDao userDao;

    /**
     * 获取通过用户名
     *
     * @param username 用户名
     * @return {@link SysUser}
     */
    @Override
    public SysUser getByUsername(String username)
    {
       return userDao.getByUsername(username);
    }

    @Override
    public List<SysUser> getList()
    {
        return userDao.getList();
    }
}
